<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jQuery鼠标事件</title>
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //当鼠标悬浮在div元素上时
            $("div").mouseover(function () {
                alert("鼠标悬浮...");
            })
            $("div").mouseout(function () {
                alert("鼠标移出...");
            })
        })
    </script>
</head>
<body>
      <div style="border: 1px solid red">
          some text....
      </div>
</body>
</html>